package com.yuyou.activity.group.service.service;

import java.util.List;

import com.yuyou.activity.group.service.entity.ActivityGroupUser;

public interface IActivityGroupUserService {
    int deleteByPrimaryKey(Long id);

    int insert(ActivityGroupUser record);

    ActivityGroupUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ActivityGroupUser record);
    
    /**
     * 根据手机号码找出正在参与
     * @param phone
     * @return
     */
    ActivityGroupUser findActiveGroupByPhone(String projectCode,String phone);
    
    /**
     * 找出参与拼图详情
     * @param projectCode
     * @param phone
     * @return
     */
    ActivityGroupUser selectByCode7Phone(String projectCode,String phone);
    
    /**
     * 根据活动ID查找
     * @param projectCode
     * @param phone
     * @return
     */
    List<ActivityGroupUser> findByActGroId(Long activityGroupId);

    /**
     * 获取状态为初始化且活动为已成功的用户数据
     * @return
     */
    List<ActivityGroupUser> findNotUpdateUser();

    /**
     * 批量更新活动用户状态为代处理
     * @param list
     */
    void updateStatusByList(List<ActivityGroupUser> list);

    void udateStatus(Long id , Integer status);
}
